//
//  CZBaseViewController.m
//  CY--OCweibo
//
//  Created by mac on 15/11/23.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "CZBaseViewController.h"
#import "CZHomeViewController.h"
#import "CZVistorView.h"
@interface CZBaseViewController ()
@property (nonatomic, strong) CZVistorView *vistorView;
@property (nonatomic, assign) BOOL userLogin;

@end

@implementation CZBaseViewController

- (void)loadView
{
    self.userLogin = NO;
    self.userLogin ? [super loadView] : [self setupVistorView];
}
/**
 *  创建访客视图
 */
- (void)setupVistorView
{
    self.view = self.vistorView;
//    NSString *Vc = [NSString stringWithFormat:@"%@",self];
//    NSLog(@"%@",[self class]);
    NSString *Vc =[NSString stringWithFormat:@"%@",[self class]];
//        NSLog(@"%@",Vc);
    if ([Vc isEqualToString:@"CZHomeViewController"]) {
        

    }else if([Vc isEqualToString:@"CZMessageViewController"]){
//        CZVistorView *view=[[CZVistorView alloc] init];
        [self.vistorView setupVistorView:@"visitordiscover_image_message" message:@"登录后，别人评论你的微博，发给你的消息，都会在这里收到知"];
        
    }else if([Vc isEqualToString:@"CZProfileViewController"]){
        
        [self.vistorView setupVistorView:@"visitordiscover_image_profile" message:@"登录后，你的微博、相册、个人资料会显示在这里，展示给别人"];
    }else if([Vc isEqualToString:@"CZDiscoverViewController"]){
        
        [self.vistorView setupVistorView:@"visitordiscover_image_message" message:@"登录后，最新、最热微博尽在掌握，不再会与实事潮流擦肩而过"];
    }
    

}

- (CZVistorView *)vistorView
{
    if (_vistorView==nil)
    {
        _vistorView=[[CZVistorView alloc] init];
    }

    return _vistorView;
}
@end
